﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Parallel3M.parallel3m.framework;
using System.Collections;


namespace Parallel3M.parallel3m.protocol
{
    public class ProtocolPayload:ParallelPayload
    {
        public ProtocolPayload()
        {

        }

        public ProtocolPayload(string procotolName, string functionName, Hashtable parameters, int routeCount)
        {
            this.routeCount = routeCount;
            handlerid = procotolName;
            request = "<request><function>" + functionName + "</function>";
            foreach (DictionaryEntry parameterEntry in parameters)
            {
                string entryName = (String)parameterEntry.Key;
                string entryValue = (string)parameterEntry.Value;
                request += "<" + entryName + ">" + entryValue + "</" + entryName + ">";
            }
            request += "</request>";
        }
    }
}
